<template>
  <div class="identity-wrap" :style="'align-items:' + al">
    <!-- 如果是楼盘-只有商家 -->
    <template v-if="userInfo.businessType == 1 && userInfo.isShop == 1 && userInfo.shopType == 2">
      <div class="identity">商家</div>
    </template>
    <template v-else>
      <template v-if="userInfo.isShop == 1">
        <div class="identity" style="margin-right: 8px">商家</div>
      </template>
      <template v-if="userInfo.businessType == 1">
        <div class="identity" v-if="userInfo.isAgent == 1">经纪人</div>
      </template>
      <template v-else>
        <div class="identity" v-if="userInfo.isAgent == 1 &&
          userInfo.shopType != 3 &&
          userInfo.shopType != 4
          ">
          经纪人
        </div>
      </template>
      <template v-if="userInfo.isShop == 0 &&
        userInfo.isAgent == 0 &&
        userInfo.enterpriseRecruitmentStatus == 0
        ">
        <div class="identity">个人</div>
      </template>
      <template v-if="userInfo.isShop == 0 &&
        userInfo.isAgent == 0 &&
        userInfo.enterpriseRecruitmentStatus == 1
        ">
        <div class="identity">企业</div>
      </template>
    </template>

  </div>
</template>

<script>
export default {
  props: {
    userInfo: {
      type: Object,
      default() {
        return {};
      }
    },
    al: {
      type: String,
      default: "center"
    }
  },
  data() {
    return {};
  }
};
</script>

<style lang="less" scoped>
.identity-wrap {
  // margin: 0 auto;
  // margin-top: 8px;
  display: flex;
  justify-content: center;
  color: #333;

  // width: 126px;
  .identity {
    width: 56px;
    height: 21px;
    background: #ffffff;
    border-radius: 14px 14px 14px 14px;
    opacity: 1;
    border: 1px solid #64b6a8;
    text-align: center;
    line-height: 21px;
    font-size: 11px;
    font-weight: 400;
    color: #64b6a8;
  }
}
</style>
